package org.skatiger.jrove.component;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

final class _ComponentMap implements Map<String, UIComponent> {

    private Map<String, UIComponent> _maps = new HashMap<String, UIComponent>();
    private UIViewRoot viewRoot;

    public _ComponentMap(UIViewRoot viewRoot) {
        this.viewRoot = viewRoot;
    }

    public int size() {
        return _maps.size();
    }

    public boolean isEmpty() {
        return _maps.isEmpty();
    }

    public boolean containsKey(Object key) {
        return _maps.containsKey(key);
    }

    public boolean containsValue(Object value) {
        return _maps.containsValue(value);
    }

    public UIComponent get(Object key) {
        return _maps.get(key);
    }

    public UIComponent put(String key, UIComponent value) {
        return _maps.put(key, value);
    }

    public UIComponent remove(Object key) {
        throw new UnsupportedOperationException("unsuported");
    }

    public void putAll(Map<? extends String, ? extends UIComponent> m) {
        _maps.putAll(m);
    }

    public void clear() {
        _maps.clear();
    }

    public Set<String> keySet() {
        return _maps.keySet();
    }

    public Collection<UIComponent> values() {
        return _maps.values();
    }

    public Set<java.util.Map.Entry<String, UIComponent>> entrySet() {
        return _maps.entrySet();
    }

}
